package com.swallowtech.mstation.core.repository.mybatis;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.swallowtech.mstation.core.domain.MusicBookmark;

public interface BookmarkMapper {

	MusicBookmark selectByPrimaryKey(String userId);
	
	@Select("select * from tbl_bookmark where user_id =  #{userId} and resource_url = #{url}")
	@Results(value = {
	        @Result(property="url", column="resource_url")
	    })
    MusicBookmark selectByUniqueKey(@Param("userId") String userId,@Param("url") String url);
    
    int deleteByPrimaryKey(String id);

    int insert(MusicBookmark record);

    int insertSelective(MusicBookmark record);

    int updateByPrimaryKeySelective(MusicBookmark record);

    int updateByPrimaryKey(MusicBookmark record);
}